package com.svse.designPattern.singleresponsibilityprinciple;

/**
 * @author LiYuhang
 * @version 0.1
 * @application
 * @Date 2020/7/25 16:04
 */
public class SingleResponsibility1 {
    public static void main(String[] args) {
        Vehicle vehicle = new Vehicle();
        vehicle.run("越野车");
        vehicle.run("轿车");
        vehicle.run("飞机");
        vehicle.run("船");
    }
}
/**
 *  所有的交通工具  共用同一个方法
 */
class Vehicle{
    void run(String vehicle){
        System.out.println(vehicle +"在公路上跑");
    }
}
